package com.luke.springcloud.config;

import feign.Logger;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

@Configuration
public class ApplicationContextConfig {

    @Bean
    @LoadBalanced
    public RestTemplate getRestTemplate() {
        return new RestTemplate();
    }

    /**配置feign日志级别：输出调用日志，同时yml文件配置com.luke.springcloud.inter: debug*/
    @Bean
    Logger.Level feignLoggerLever(){
        return Logger.Level.FULL;
    }

}